//
//  TravelTourBigModel.m
//  ToWhere
//
//  Created by dllo on 15/11/18.
//  Copyright © 2015年 www.TE.com. All rights reserved.
//

#import "TravelTourBigModel.h"
#import "TravelTourMiddleModel.h"



@implementation TravelTourBigModel

-(void)dealloc
{
    [_arrTourBig release];
    [_name release];
    [super dealloc];
}

-(instancetype)initWithNSDictionary:(NSDictionary *)dic
{
    self = [self init];
    if (self) {
        self.arrTourBig = [NSMutableArray array];
        [self setValuesForKeysWithDictionary:dic];
    }
    
    return self;
}



+(TravelTourBigModel *)travelTourBigModelWithNSDictionary:(NSDictionary *)dic
{
    TravelTourBigModel *model = [[TravelTourBigModel alloc]initWithNSDictionary:dic];
    
    return [model autorelease];
    
    
}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"attraction_contents"]) {
        
        NSArray *A = value;
        
        
        for (NSDictionary *DIC in A) {
            
            TravelTourMiddleModel *model = [TravelTourMiddleModel travelTourMiddleModelWithNSDictionary:DIC];
            
            [self.arrTourBig addObject:model];
            
            
        }
        
    }
    
    
    
}



@end
